package com.rui.study.algorithm.T_two_var;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TwoVar {

    private static final Logger LOGGER = LoggerFactory.getLogger(TwoVar.class);

    public static void exchange(int a, int b) {
        LOGGER.info("Before exchanging: a-->{}, b-->{}", a, b);
        a += b;
        b = a - b;
        a = a - b;
        LOGGER.info("After exchanging: a-->{}, b-->{}", a, b);
    }
}
